package org.vm.cmbcdirect.manager.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.vm.cmbcdirect.manager.dao.UserDao;
import org.vm.cmbcdirect.manager.model.User;
import org.vm.cmbcdirect.manager.service.UserService;

import java.util.List;

/**
 * Created by hsrj05 on 2016/3/18.
 */
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    protected UserDao userDao;

    public List<User> selectAllUsers() {
        return userDao.queryAll();
    }

    @Transactional
    public void saveUser(User user) {
        userDao.save(user);
    }

}
